package cn.edu.zafu.bigdata.x.qianjingxuan.exp;

import java.util.ArrayList;
import java.util.List;

public class TestGenericUtils {
    public static void main(String[] args) {
        // 测试整数列表
        List<Integer> intList = new ArrayList<>();
        intList.add(10);
        intList.add(20);
        intList.add(5);
        intList.add(30);
        
        Integer maxInt = GenericUtils.findMax(intList);
        System.out.println("Max Integer: " + maxInt); // 输出：Max Integer: 30

        // 测试字符串列表
        List<String> strList = new ArrayList<>();
        strList.add("apple");
        strList.add("orange");
        strList.add("banana");
        strList.add("pear");

        String maxStr = GenericUtils.findMax(strList);
        System.out.println("Max String: " + maxStr); // 输出：Max String: pear
    }
}
